<?php
$v_method = 1;
$v_current_af_id = '';
if(isset($_REQUEST['hdn_af_id'])){
	$v_current_af_id = $_REQUEST['hdn_af_id'];
}
//Luu nhung dieu kien loc hien thoi
//Cac chu cai loc
/*
if(isset($_REQUEST['hdn_filter'])){
	$v_filter = $_REQUEST['hdn_filter'];
}else{	
	$v_filter = "";
}
//Linh vuc loc
if(isset($_REQUEST['hdn_back_cate_id']))
{
	$v_cate_id = $_REQUEST['hdn_back_cate_id'];
}
if(isset($_REQUEST['hdn_back_agency_id']))
{
	$v_agency_id = $_REQUEST['hdn_back_agency_id'];
}
if (isset($_REQUEST['hdn_method'])){
	$v_method = $_REQUEST['hdn_method'];
}
if (isset($_REQUEST['hdn_status']))
{
	$v_status = $_REQUEST['hdn_status'];
}
*/
// Luu ten style hien thoi
$v_current_style_name = "odd_row";
// Luu ten style tiep theo
$v_next_style_name = "";
// Luu ten form
$v_form_name = "f_dsp_all_af";
$v_goto_url = "index.php";
?>
<!--bang chua tieu de cua form-->
<table width="100%" cellpadding="0" cellspacing="0">
	<tr><td height="10"></td></tr>
	<tr class="page_title">
		<td colspan="3"><?php echo CONST_SEARCH_CONDITIONS_LABEL; ?></td>
	</tr>
</table>
<!-- bang chua cac tieu thuc loc-->
<table cellpadding="0" cellspacing="0" width="100%" >								
	<tr>
	 	<form action="index.php" name= "<?php echo $v_form_name;?>" method="post">
		<input type="hidden" name="hdn_af_id"  value="">
		<input type="hidden" name="hdn_back_cate_id"  value="0">
		<input type="hidden" name="hdn_method" value="1">
		<input type="hidden" name="hdn_back_agency_id"  value="0">
		<input type="hidden" name="hdn_status" valus = "">
		<input type="hidden" name="hdn_list_af_id"  value="0">
		<input type="hidden" name="hdn_filter"  value="">
		<input type="hidden" name="fuseaction"  value="">
	</tr>
	<tr><td height="5"></td></tr>
</table>	
<table width="100%" cellpadding="0" cellspacing="0" border="0">	
	<tr><td width="27%" height="15"></td></tr>
	<tr>
	    <td class="normal_label" ><?php echo CONST_AGENCY_LABEL;?></td>
		<td width="60%" class="normal_label" >
			<select class= "normal_selectbox" style="width:80%"   name = "cbo_af_agency" onChange="get_id_from_selected(document.f_dsp_all_af.cbo_af_agency,document.f_dsp_all_af.hdn_back_agency_id);" optional = "<?php echo ""; ?>">
				<option id="-1",value="-1"><?php echo ALL_LABLE ?></option>			
				<? echo _generate_select_option($arr_all_agency,"0","0","2", $v_agency_id);?>
			</select>
		</td>
	</tr>
	<tr><td height="10"></td></tr>
	<tr>
		<td class="normal_label"><?php echo CONST_CATEGORY_LABEL;?></td>
		<td class="normal_label" >
			<select class= "normal_selectbox" style="width:75%"  name = "cbo_af_cate" onChange="get_id_from_selected(document.f_dsp_all_af.cbo_af_cate,document.f_dsp_all_af.hdn_back_cate_id);" optional = "<?php echo ""; ?>">
				<option id="-1",value="-1"><?php echo ALL_LABLE; ?></option>
				<? echo _generate_select_option($arr_all_cate,"0","0","2", $v_cate_id);?>	
			</select>
		</td>
	</tr>
	<tr><td height="10"></td></tr>
	<tr>
		<td class="normal_label"><?php echo CONST_SEARCH_BY_LABEL;?></td>
		<td class="normal_label">
			<input type="radio" name="rad_filter" class="normal_radiobutton" value="1" <?php if ($v_method == 1) echo 'checked';?> onclick="document.f_dsp_all_af.hdn_method.value = 1;"> 
			<?php echo CONST_NAME_LABEL;?>
			<input type="radio" name="rad_filter" class="normal_radiobutton" value="0" <?php if ($v_method == 0) echo 'checked';?> onclick="document.f_dsp_all_af.hdn_method.value = 0;">
			<?php echo CONST_CONTENT_LABEL;?>
		</td>
	</tr>
	<tr><td height="10"></td></tr>
	<tr>
		<td width="27%" class="normal_label"><?php echo CONST_SEARCH_KEY_LABEL;?></td>
		<td class="normal_label">
			<input type="text" class="normal_textbox" size="29" name="txt_filter_value" value="<?php //echo $v_filter; ?>" onKeyDown="txt_filter_keydown()">
		</td>
	</tr>
	<tr><td height="20"></td></tr>
	<tr>
		<td class="normal_label" align="center"></td>
		<td class="normal_label" align="left">
			<input type="button" class="small_button" style="width:15%" name="btn_filter" value="<?php echo CONST_SEARCH_BUTTON; ?>" onClick="btn_search_af_by_conditions_onclick();">
		</td>
	</tr>
</table>
</form>
